import * as React from 'react';
import {Link} from 'react-router-dom'
import s from './index.module.scss'
export default function TabbaItem(props:any){
    let { icon, title, itemKey,lightHight,activeKey,activeIcon} = props
    return(
        //绑定点击跳转事件
       <div className={s.item} onClick={()=>lightHight(itemKey)}>
           <Link to={itemKey} style={{ textDecoration: "none"}} className={s.link}>
                <svg className={s.itemIcon} aria-hidden="true">
                        <use xlinkHref={activeKey==itemKey? activeIcon:icon}></use>
                    </svg>
                <div className={s.itemText} style={activeKey===itemKey ? {color:'#000'}:{} }>{title}</div>
           </Link>
       </div>
    )
}